<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-row>
      <el-col :span='22' :xs='24'>
        <el-form ref="form" :model="part" :rules="rules" label-width="100px" id="mvcfm">
          <el-button @click="gotoPage('7226EC3CB61146659588EDC9CB8CD941?'+vueparams+'')" type='primary' size="mini">添加组件</el-button>
          <div class="form-unit">
            <span class="mvc-title-left"> 组成 </span>
          </div>
          <el-table :data="part">
            <el-table-column label="操作" align="center" width='100' type=''>
              <template slot-scope="scope">
                <el-dropdown trigger="click">
                  <span class="el-dropdown-link">操作<i class="el-icon-arrow-down el-icon--right"></i></span>
                  <el-dropdown-menu slot="dropdown">
                    <el-dropdown-item>
                      <el-link @click="gotoPage('BD3CA2F1B8234DF188312DAA4E71522B?&CMID1='+scope.row.part_id+''+vueparams+'')">查看明细</el-link>
                    </el-dropdown-item>
                    <el-dropdown-item>
                      <el-link @click="gotoPage('&CMID1='+scope.row.part_id+''+vueparams+'')">查看组成记录</el-link>
                    </el-dropdown-item>
                    <el-dropdown-item>
                      <el-link @click="gotoPage('&CMID1='+scope.row.part_id+''+vueparams+'')">删除</el-link>
                    </el-dropdown-item>
                  </el-dropdown-menu>
                </el-dropdown>
              </template>
            </el-table-column>
            <el-table-column label="组件" prop="">
              <template slot-scope="scope">
                <el-link @click="gotoPage('05AAEF6BA47E4A18BFE97A165837914A?'+vueparams+'')" type='primary'>{{scope.row['']}}</el-link>
              </template>
            </el-table-column>
            <el-table-column label="关闭可能性" prop="part_clised">
            </el-table-column>
            <el-table-column label="猜测金额" prop="part_des">
            </el-table-column>
            <el-table-column label="当前状态" prop="">
            </el-table-column>
            <el-table-column label="估计关闭日期" prop="part_closedate">
            </el-table-column>
            <el-table-column label="归属于" prop="">
              <template slot-scope="scope">
                <el-link @click="gotoPage('BD3CA2F1B8234DF188312DAA4E71522B?'+vueparams+'')" type='primary'>{{scope.row['']}}</el-link>
              </template>
            </el-table-column>
          </el-table>
        </el-form>
      </el-col>
      <el-col :span='2' :xs='24'>
        <el-menu default-active='active' class='menu-unit'>
          <el-menu-item v-for='item in Container'>
            <el-link @click="gotoMenu(item.url)" :type="'商机管理'===item.name?'primary':'default'">{{item.page_desc||item.name}}</el-link>
          </el-menu-item>
        </el-menu>
      </el-col>
    </el-row>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'BusinesStructure',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        part: [],
        loading: false,
        Container: null,
        rules: {}
      }
    },
    created() {
      this.getData();
      this.loadContainerMenu({
        pid: "80299289AF2443B18EA545A4C0C37170",
        name: "客户管理右菜单",
        selected: "商机管理"
      }, 'Container', this.vueparams);
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/psi/supplychainmana/SupplierCtrl/businesStructure?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
        })
      },
    },
  }
</script>
